package com.press.services;

import com.press.bean.CommentBean;
import com.press.bean.ContentBean;
import com.press.mapper.PanelMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * by cherry
 * Created by Lenovo on 2016/10/9.
 */
@Service("panelService")
public class PanelService {
    @Resource(name="PanelMapper")
    private PanelMapper panelMapper;
    //得到所有的文章的数量
    public int getContentCount(){
        return panelMapper.getContentCount();
    }
    //得到所有评论的数量
    public int getCommentCount(){
        return panelMapper.getCommentCount();
    }
    //得到文章垃圾箱中的数量
    public int getContentLaggCount(){
        return panelMapper.getContentLaggCount();
    }

    //得到评论垃圾箱的数量
    public int getCommentLaggNUM(){
        return panelMapper.getCommentLaggNUM();
    }
    //得到最近的文章
    public List<ContentBean> getFRecentContentMess(){
        return panelMapper.getFRecentContentMess();
    }
    public PanelMapper getPanelMapper() {
        return panelMapper;
    }

    public void setPanelMapper(PanelMapper panelMapper) {
        this.panelMapper = panelMapper;
    }
}
